<template>
	<view class="container">
		<!-- Header -->
		<view class="headerBag">
			<image src="/static/img/icon-Get-into@3.png" class="back" @click="goBack"></image>
			<text class="font18 pagetitle">订单付款成功</text>
		</view>
		
		<!-- Content -->
		<view id="wrapper">
			<view class="reminders font14">
				<view class="success microFamily">
					<image src="/static/img/wancheng@2x.png" />
					<view id="inforbox">
						<view>支付方式: {{ paymentType }}</view>
						<view>支付金额: ￥{{ totalMoney }}</view>
					</view>
				</view>
			</view>
			<view class="returnBTN font18" @click="viewOrderDetail">查看订单详情</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				orderNum: '',
				paymentType: '',
				totalMoney: ''
			}
		},
		onLoad(options) {
			// 获取页面参数
			this.orderNum = options.order_num || '';
			this.paymentType = options.type || '';
			this.totalMoney = options.TotalMoney || '';
		},
		methods: {
			goBack() {
				uni.navigateBack();
			},
			viewOrderDetail() {
				uni.navigateTo({
					url: `/pages/order/order-info?order_num=${this.orderNum}&from=OKpay`
				});
			}
		}
	}
</script>

<style scoped>
	.container {
		background: #eeeeee;
		min-height: 100vh;
	}
	
	.headerBag {
		background-color: #f00000;
		display: flex;
		align-items: center;
		padding: 20rpx;
		position: relative;
	}
	
	.back {
		width: 40rpx;
		height: 40rpx;
	}
	
	.pagetitle {
		flex: 1;
		text-align: center;
		color: white;
	}
	
	.font18 {
		font-size: 36rpx;
	}
	
	.font14 {
		font-size: 28rpx;
	}
	
	.reminders {
		background: white;
		width: 100%;
		height: 200rpx;
		text-align: center;
		padding-top: 57rpx;
	}
	
	.reminders image {
		height: 48.5rpx;
		width: 48.5rpx;
	}
	
	.success {
		width: 277rpx;
		margin: 0 auto;
		display: flex;
		justify-content: space-between;
		align-items: flex-start;
	}
	
	.success > view {
		width: 214rpx;
		text-align: left;
		line-height: 24rpx;
		text-indent: 10rpx;
	}
	
	.returnBTN {
		background: #ff2e00;
		color: white;
		width: 355rpx;
		height: 45rpx;
		margin: 0 auto;
		border-radius: 5rpx;
		text-align: center;
		line-height: 45rpx;
		margin-top: 17.5rpx;
	}
	
	.microFamily {
		/* 可以根据需要添加字体样式 */
	}
</style>